/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bio.jpa.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author Diego
 */
@Embeddable
public class SessionPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "ses_id")
    private int sesId;
    @Basic(optional = false)
    @Column(name = "uid_fk")
    private int uidFk;

    public SessionPK() {
    }

    public SessionPK(int sesId, int uidFk) {
        this.sesId = sesId;
        this.uidFk = uidFk;
    }

    public int getSesId() {
        return sesId;
    }

    public void setSesId(int sesId) {
        this.sesId = sesId;
    }

    public int getUidFk() {
        return uidFk;
    }

    public void setUidFk(int uidFk) {
        this.uidFk = uidFk;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) sesId;
        hash += (int) uidFk;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SessionPK)) {
            return false;
        }
        SessionPK other = (SessionPK) object;
        if (this.sesId != other.sesId) {
            return false;
        }
        if (this.uidFk != other.uidFk) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.bio.jpa.entities.SessionPK[ sesId=" + sesId + ", uidFk=" + uidFk + " ]";
    }
    
}
